<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
	String userId = "";
	String userPw = "";
	Cookie cookie[] = request.getCookies();
	if (cookie != null) {
		for (int i = 0; i < cookie.length; i++) {
			if (cookie[i].getName().equals("cId"))
				userId = java.net.URLDecoder.decode(cookie[i].getValue());
			if (cookie[i].getName().equals("cPw"))
				userPw = java.net.URLDecoder.decode(cookie[i].getValue());
		}
	}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" />
<title>로그인</title>
<link rel="stylesheet" type="text/css" href="${requestScope.contextPath}/css/import.css" />
<script type="text/javascript" src="${requestScope.contextPath}/js/jquery-ui-1.8.14.custom/js/jquery-1.5.1.min.js"></script>
<script type="text/javascript">
	function formCheck() {
		if($('#userId').val() == "") {
			alert("아이디를 입력하세요.");
			return false;
		}
		if($('#userPw').val() == "") {
			alert("비밀번호를 입력하세요.");
			return false;
		}
		return true;
	}
</script>
</head>
<body>
	<div id="wrap">
		<div class="header">
			<h1>로그인</h1>
		</div><!-- // header -->
		<div class="login">
			<div class="form">
				<form id="form_" name="form_" action="${requestScope.contextPath}/business/login/webLogin.do" method="post" onsubmit="return formCheck();">
				<input type="hidden" name="qry" value="${param.qry}" />
					<fieldset>
						<legend>로그인</legend>
							<p><label for="uid"><span>아이디</span></label><input type="text" name="userId" value="<%=userId%>" id="userId" style="ime-mode:disabled;height: 20px;" /></p>
							<p><label for="pwd"><span>비밀번호</span></label><input type="password" name="userPw" value="<%=userPw%>" id="userPw" style="height: 20px;" /></p>
							<p class="btn">
								<input type="image" src="${requestScope.contextPath}/images/btn/btn_login.gif" alt="로그인" style="width: 80px;height: 28px; border:none" />&nbsp;&nbsp;
								<a href="#" onclick="$('#form_')[0].reset();"><img src="${requestScope.contextPath}/images/btn/btn_reset2.gif" alt="취소" /></a>
							</p>
					</fieldset>
				</form>
			</div>
		</div><!-- // login -->
		
	</div><!-- // wrap -->
</body>
</html>